package com.qianfeng.utils;

import com.qianfeng.pojo.BaseUser;
import com.qianfeng.pojo.SysUserInfo;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

/*
 *@Description:
 *@author:刘哥
 *@Date:86180 2022/9/6 19:26
 */
public class LoginUsersUtils {
    public static BaseUser getLoginUser() {
        Object user = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest().getSession().getAttribute("user");
        return (BaseUser) user;
    }
}
